<template>
    <el-dialog :title="titleMap[mode]" v-model="visible" :width="600"  destroy-on-close @closed="$emit('closed')" align-center >
        <el-main class="nopadding">
            <scTable ref="table" :apiObj="apiObj" row-key="id" :params="query" height="550">
                <el-table-column label="业务员" prop="staff.name" align="center"></el-table-column>
                <el-table-column label="首次查看" prop="create_time" align="center"></el-table-column>
                <el-table-column label="最近查看" prop="update_time" align="center"></el-table-column>
            </scTable>
        </el-main>
		<template #footer>
			<el-button @click="visible = false">取 消</el-button>
		</template>
	</el-dialog>
</template>

<script>
export default {
    props: {
        query: { type: Object, default: () => ({}) },
    },
	emits: ['success', 'closed'],
	data() {
		return {
			dialog: {
				client: false
			},
			mode: "add",
			titleMap: {
				add: '新增销售',
				edit: '查看签名',
				show: '查看'
			},
			visible: false,
			isSaveing: false,
            apiObj: this.$API.business.purchase.order.look,
		}
	},
	mounted() {
	},
	methods: {
		//显示
		open(mode = 'add') {
			this.mode = mode;
			this.visible = true;
			return this
		},
	}
}
</script>

<style lang="scss">
.el-input-group__append{
    padding: 0 8px;
}
</style>
